package com.seadragon.app.ksr.service;

import java.util.List;

import com.seadragon.app.ksr.model.Customer;
import com.seadragon.app.ksr.model.CustomerEventSubscription;
import com.seadragon.app.ksr.model.Event;

public interface CustomerService {

	/*
	 * Customer returned has all updated ids.
	 */
	Customer update(Customer customer);

	void save(Customer customer);

	Customer findByEmail(String email);

	Customer findById(long id);

	List<Customer> findAll(int offset, int pageSize);

	void subscribe(CustomerEventSubscription customerEventSubscription);

	void unsubscribe(CustomerEventSubscription customerEventSubscription);

	void update(CustomerEventSubscription customerEventSubscription);

	List<Customer> findAllSubscribers(Event event);

	List<CustomerEventSubscription> findAllSubscriptions(Customer customer);

	List<CustomerEventSubscription> findBy(Customer customer, Event event);

	List<CustomerEventSubscription> findAllSubscriptions(Customer customer, int offset, int pageSize);

}
